Other Customisations
Stirling PDF offers various other customisation options, such as:
Static File Overrides
You can override static files (logos, images, favicons, etc.) by placing custom versions in the customFiles/static/ directory.
How It Works
Stirling-PDF checks for files in this order:
- First:
customFiles/static/(your custom files) - Fallback: Built-in static files embedded in the application
This means you can replace any static resource by placing a file with the matching path in customFiles/static/.
Finding File Paths to Override
Static files in the application come from the frontend/public/ folder in the source code. The mapping is direct:
Frontend source → Your override path:
frontend/public/favicon.svg→customFiles/static/favicon.svgfrontend/public/modern-logo/logo.svg→customFiles/static/modern-logo/logo.svgfrontend/public/classic-logo/logo.svg→customFiles/static/classic-logo/logo.svg
To see what files you can override:
- Browse the frontend/public folder on GitHub
- Match the directory structure in your
customFiles/static/folder
Common files you might want to override:
Favicons & Icons:
favicon.svg,favicon.ico- Browser faviconsapple-touch-icon.png- iOS home screen iconandroid-chrome-192x192.png- Android icon (192x192)android-chrome-512x512.png- Android icon (512x512)
Logo Variants (Both classic-logo/ and modern-logo/):
Both logo directories contain the same file structure - just replace classic-logo/ or modern-logo/ with whichever style you're using:
{style}/StirlingPDFLogoBlackText.svg- Logo with black text (light mode){style}/StirlingPDFLogoWhiteText.svg- Logo with white text (dark mode){style}/StirlingPDFLogoGreyText.svg- Logo with grey text{style}/StirlingPDFLogoNoTextDark.svg- Logo without text (dark variant){style}/StirlingPDFLogoNoTextLight.svg- Logo without text (light variant){style}/logo-tooltip.svg- Small logo for tooltips{style}/favicon.ico- Style-specific favicon{style}/logo192.png,{style}/logo512.png- PNG versions at different sizes{style}/Firstpage.png- First page preview image
Where {style} is either classic-logo or modern-logo depending on your logo style setting:
Settings file (configs/settings.yml):
ui:
logoStyle: classic # Options: 'classic' or 'modern'
Environment variable (Docker):
UI_LOGOSTYLE=classic
In-app configuration: Settings → UI → Logo Style (requires login enabled)
Other Assets:
moon.svg- Dark mode toggle iconrobots.txt- Search engine directivesmanifest.json,manifest-classic.json- Web app manifests- Images, fonts, and locales
Example: Custom Favicon
# Your directory structure
customFiles/
└── static/
├── favicon.svg
└── favicon.ico
Docker compose:
volumes:
- ./customFiles:/customFiles:rw
Restart the container - your custom favicons will be used!
Example: Custom Logo (Simple)
customFiles/
└── static/
└── classic-logo/
└── StirlingPDFLogoBlackText.svg
This overrides the classic logo with black text (used in light mode).
Important: Make sure your logo style is set to classic in your configuration:
ui:
logoStyle: classic # Must match the directory you're overriding!
Or via environment variable:
UI_LOGOSTYLE=classic
If you have logoStyle: modern set, override files in modern-logo/ instead!
Example: Complete Branding Customization
To fully rebrand Stirling-PDF with your company logo, override multiple variants:
customFiles/
└── static/
├── favicon.svg # Main favicon
├── favicon.ico # Legacy favicon
└── classic-logo/ # Or modern-logo/ if using modern style
├── StirlingPDFLogoBlackText.svg # Light mode with text
├── StirlingPDFLogoWhiteText.svg # Dark mode with text
├── StirlingPDFLogoNoTextLight.svg # Light mode icon only
├── StirlingPDFLogoNoTextDark.svg # Dark mode icon only
├── logo-tooltip.svg # Small icon
├── favicon.ico # Style-specific favicon
└── Firstpage.png # Homepage preview
Important: Set your logo style to match the directory:
ui:
logoStyle: classic # Use 'classic' if overriding classic-logo/, 'modern' if overriding modern-logo/
Or via environment variable: UI_LOGOSTYLE=classic
Tips:
- For consistent branding across light/dark modes, provide both:
StirlingPDFLogoBlackText.svg(shows on light backgrounds)StirlingPDFLogoWhiteText.svg(shows on dark backgrounds)
- You can also configure this in-app: Settings → UI → Logo Style (if you have login enabled)
Advanced: Overriding Built Files (HTML, JS, CSS)
⚠️ For developers only!
Files like index.html, JavaScript bundles, and CSS are generated by the build process from frontend/src/. To override these:
- Clone the Stirling-PDF repository
- Make your changes to the React source code in
frontend/src/ - Build the frontend:
npm run build(from thefrontend/directory) - The built files appear in
frontend/dist/ - Copy the specific files you want to override to
customFiles/static/matching the path structure
Example: To override index.html:
# After building the frontend
cp frontend/dist/index.html customFiles/static/index.html
Warning: Built files may include hashed filenames (e.g., assets/index-abc123.js) that change with each build. Overriding these requires matching the exact filename from your build and is not recommended for most users.
Defaulting Language
Default language selection via the SYSTEM_DEFAULTLOCALE environment variable. Accepted values include de-DE, fr-FR, ar-AR and all other languages codes that are within Stirling-PDFs current list.
Google Search Visibility (robots.txt)
Enable or disable search engine visibility with the ALLOW_GOOGLE_VISIBILITY variable.
Custom Root path
Redirect the root path of the application using APP_ROOT_PATH.
This is for changing websites like stirlingtools.com to instead host the interface at stirlingtools.com/APP_ROOT_PATH like stirlingtools.com/demo
Enable/Disable Analytics
Analytics can be enabled/disabled with SYSTEM_ENABLEANALYTICS or
system:
enableAnalytics: 'true'
In configs/Settings.yml